home *** CD-ROM | disk | FTP | other *** search
- /* strncpy.c */
-
- /* JOVE/MSDOS. K. Mitchum 1/85 */
- /* Ken Mitchum */
- /* University of Pittsburgh */
- /* Decision Systems Laboratory */
-
- /* altered version for jove */
-
- /* copy a string into a buffer n characters in length
- */
-
- unsigned char *strncpy(to,from,n)
- unsigned char *to,*from;
- unsigned n;
- {
- unsigned char *cp;
-
- for(cp=to;n && (*cp=*from++);n--,cp++);
- while(n--)*cp++=0;
- return to;
- }
-